<% @page_title = "Home Page" %>
<style>
	div.prod_img img {
		width: 108px;
		height: 165px;
	}
	
	span.new_book_img img {
		width: 60px;
		height: 90px;
	}
</style>
<div class="title"><span class="title_icon"><%=image_tag("bullet1.gif") %></span>New books<% if params[:cate] %>&nbsp;:&nbsp;<%= BookCategory.getBookCateName(params[:cate])%><% end %></div>
<% for book in @new_books %>
<div class="feat_prod_box">
	<div class="prod_img"><%= link_to image_tag(book.image_url), :controller => 'default/book', :action => 'view', :id => book.id %></div>
	<div class="prod_det_box">
		<div class="box_center">
			<div class="prod_title"><%= link_to book.title, :controller => 'default/book', :action => 'view', :id => book.id %></div>
			<p class="details"><%= book.description %></p>
			<%= link_to 'more details', {:controller => 'default/book', :action => 'view', :id => book.id}, :class => 'more' %>
			<div class="clear"></div>
		</div>
	</div><!-- End .prod_det_box -->
	<div class="clear"></div>
</div><!-- End .feat_prod_box -->
<% end %><!-- endfor -->
<div class='paginator' style='margin-left:100px'><%= will_paginate @new_books %></div>
<div class='clear'></div>

<div class="title"><span class="title_icon"><%=image_tag("bullet2.gif") %></span>Featured books</div>  
<div class="new_products">
	<% for book in @featured_books %>
	<div class="new_prod_box">
		<%= link_to book.title, :controller => 'default/book', :action => 'view', :id => book.id %>
		<div class="new_prod_bg">
			<span class='new_book_img'><%= link_to image_tag(book.image_url), :controller => 'default/book', :action => 'view', :id => book.id %></span>
		</div>
	</div><!-- End .new_prod_box -->
	<% end %>
</div><!-- End .new_products -->
